Japanese Patent No. 4321411 shows a system which performs a cylinder-by-cylinder air-fuel ratio control. In the cylinder-by-cylinder air-fuel ratio control, an air-fuel ratio in each cylinder of an internal combustion engine is estimated based on a detection value of an air-fuel ratio sensor disposed in a confluent portion of an exhaust gas emitted from the internal combustion engine. Based on the estimated air-fuel ratio of each cylinder, the actual air-fuel ratio of each cylinder is controlled. While performing the cylinder-by-cylinder air-fuel ratio control, based on a dispersion in estimated air-fuel ratio of each cylinder, a computer determines a deviation of air-fuel ratio detecting time with respect to each cylinder. Based on a relationship between a variation in estimated air-fuel ratio of at least one cylinder and a variation in its corrected amount of fuel, an air-fuel ratio detecting time of each cylinder is corrected.
Specifically, when the computer determines that the air-fuel ratio detecting time deviates while performing the cylinder-by-cylinder air-fuel ratio control, the air-fuel ratio detecting time is retarded by a specified crank angle (for example, 30 CA degree) from the current air-fuel ratio detecting time or the most advanced time. The computer repeats the processing in which a correlation coefficient is computed by multiplying a variation in estimated air-fuel ratio of at least one cylinder and a variation in corrected fuel amount. A time point at which the correlation coefficient becomes the most appropriate is learned as the most appropriate air-fuel ratio detecting time. Then, the computer corrects the air-fuel ratio detecting time to the most appropriate time.
In the above system, when the most appropriate air-fuel ratio detecting time significantly deviates from the current air-fuel ratio detecting time or the most advanced time (for example, 360 CA degree), it is necessary to repeatedly perform the processing in which the air-fuel ratio detecting time is retarded by a specified crank angle (for example, 30 CA degree) and the correlation coefficient is computed many times. Thus, it may take a long time period to correct the air-fuel ratio detecting time. As above, when it takes a long time period to correct the air-fuel ratio detecting time, the air-fuel-ratio dispersion between each cylinder may not be corrected appropriately, which may cause a deterioration in exhaust emission. Also, a malfunction of the air-fuel ratio sensor may not be detected.